package com.zhn.evsi.controller.System;

import com.zhn.evsi.common.RedisCache;
import com.zhn.evsi.common.Result;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;

@Api(tags = "进度条")
@RestController
@RequestMapping("/sys/progress")
public class SysProgressController {

    @Resource
    private RedisCache redisCache;

    @ApiOperation("市场更新进度条")
    @GetMapping("/marketProgress")
    public Result marketProgress() {
        Double recordProgress = redisCache.getCacheObject("Progress:MarketRecord:");
        return Result.success(recordProgress);
    }
}
